#include "compositeordermanagermodule.h"
#include "compositeordermanageredit.h"

struct CompositeOrderManagerModulePrivate {
    QList<MenuInfos> acts;
    ~CompositeOrderManagerModulePrivate(){
    }
};


CompositeOrderManagerModule::CompositeOrderManagerModule(QObject* parent) {
    m_d = new CompositeOrderManagerModulePrivate;
}


CompositeOrderManagerModule::~CompositeOrderManagerModule() {
    delete m_d;
}

QString CompositeOrderManagerModule::name() {
    return "CompositeOrderManager";
}
void CompositeOrderManagerModule::initialize() {
    auto act = ToolsInterface::createAction("Composite Order Manager");
    MenuInfos info;
    info.act = act;
    info.parentMenu = "";
    m_d->acts.push_back(info);
}

/**
     * @brief 获取主界面菜单名称
     * @return 返回父菜单名称字符串
     */
QString CompositeOrderManagerModule::toolMenuName() {
    return "Tools";
}

QList<MenuInfos> CompositeOrderManagerModule::menuInfos()
{
    return m_d->acts;
}

IoEditFrameInterface *CompositeOrderManagerModule::getEditWgtByName(const QString &actionName)
{
    if (actionName == "Composite Order Manager")
        return new CompositeOrderManagerEdit();
    return nullptr;
}
